Skip to content

feat!: redesigned CLI experience - #28

Merged
abhiramkast merged 20 commits into
mainfrom
pr1-shared-lines-core
May 14, 2026
Merged

feat!: redesigned CLI experience#28
abhiramkast merged 20 commits into
mainfrom
pr1-shared-lines-core

Conversation

@abhiramkast

@abhiramkast abhiramkast commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

The Linq CLI now ships with a built-in signup flow. Get a developer account and a working phone line in under a minute, then send and receive messages from your terminal.

What's new

  • linq signup — create a Linq developer account with email verification. You get a shared phone line ready to use.
  • linq login — log in with email verification on a new machine.
  • linq logout — clear local credentials.
  • linq whoami — see your current account, phone line, and API key.
  • linq contacts add | list | remove — manage the contacts your shared line can message.
  • linq webhooks listen --forward-to <url> — forward incoming events to a local server during development.
  • linq phonenumbers set — set the default sender phone for the active profile.

Breaking changes

  • linq signup no longer provisions a temporary 3-hour playground phone via GitHub. It now creates a real Linq account with a shared line via email verification.
  • linq login no longer accepts a pasted API token. It uses email verification. Power users can still wire up a token via `linq init` or `linq profile set token `.
  • Customers on previous CLI versions must reinstall to use the new signup and login flows.

BREAKING CHANGE: linq signup and linq login now use email verification. Old CLI installs cannot sign up new users.

- 3-step signup: email → OTP → verify (existing users skip prompts)
- Login refactor: OTP-based auth with account type detection (Paid/Shared/Sandbox)
- contacts add/remove/list: shared line contact management
- whoami: show account type, phone, email
- logout: clear current session
- Config: added tier, tenantType, orgId to profile
- api-client: added BACKEND_URL for zero-service
- base-command: clean ExitError handling
Move duplicated tier/tenantType checks from contacts add/remove/list
into a reusable requireSharedLine() helper in config.ts. Also adds
isSandbox, isSharedLine, isPaid constants for account type checks.
Comment thread src/lib/base-command.ts Outdated
throw err;
}
// Clean output for user-facing errors (missing args, flags, validation)
if (err instanceof Errors.CLIError || (err as any).oclif) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we not able to standardize our errors to be consistent?

await expect(cmd.run()).rejects.toThrow('Something else broke');
});

it('uses cached GitHub token on retry instead of device flow', async () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait we removing GH flow entirely now? ppl are using this flow to login and stay auth'd.

what's your plan to have them reauthenticate or explain this is a breaking change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we are removing GH flow entirely. But since GH flow was only 3 hours phone lines, they can just signup for shared line and then get a new account. signup works even through linq login. so next time they try to login/signup it is just takes them to a new flow.

jflayhart
jflayhart previously approved these changes Apr 14, 2026
Comment thread src/lib/config.ts
Comment thread src/lib/config.ts
* feat: webhooks listen/logs, phonenumbers set, voicememo updates

- webhooks listen: WebSocket relay with --forward-to for local dev
- webhooks logs: view recent webhook delivery logs
- webhooks events: improved output formatting
- phonenumbers set: pick default phone for MULTI lines
- voicememo: added from flag support

* fix: update listen test for new error handling

* fix: import ws for Node 20 WebSocket compatibility

* revert: remove voicememo from flag change (separate PR)

* fix: use rolling eviction for dedup set instead of bulk clear

* chore: command audit, error handling cleanup, and test updates (#30)

* chore: command audit, error handling cleanup, and test updates

- chats create: dynamic error messages based on account type, telemetry
- format.ts: improved output formatting across commands
- doctor.ts: updated diagnostics
- init.ts: cleanup
- All commands: consistent error handling, clean flag descriptions
- Test updates for new error messages and SDK methods
- Removed dead signup tests (replaced by OTP flow)

* refactor: extract shared auth flow into auth-flow.ts

Login and signup now call the same runAuthFlow() function.
Both handle existing users (welcome back) and new users
(provision) identically. Removes duplicate code.

* feat: session check, whoami cleanup, unhide init/profile, attachment-url

- auth-flow: check existing session before signup/login, block if logged in
- auth-flow: remove phone number prompt (unused for shared lines)
- whoami: only show fields that exist, no misleading "phone not set"
- unhide init and all profile commands
- config: remove dead sandbox profile check from saveProfile
- chats create + messages send: add --attachment-url flag
Wire auth-flow.ts to the new /cli/signup secure-token endpoint (verify-code
returns either an auth token for existing users or a one-time signupToken
for new users, which /cli/signup consumes single-use).

Rewrite README quick-start and command docs to match: signup/login are
email OTP flows (no GitHub OAuth, no API-token paste); add docs for
logout/whoami/contacts/webhooks listen --forward-to/webhooks logs;
drop sandbox-profile language now that there's no sandbox flow on the CLI.
@abhiramkast abhiramkast changed the title feat: shared line signup, login, and contacts feat!: redesigned CLI experience May 14, 2026
@abhiramkast
abhiramkast merged commit b128ecc into main May 14, 2026
4 checks passed
@abhiramkast
abhiramkast deleted the pr1-shared-lines-core branch May 14, 2026 23:06
@jflayhart

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants